A function for stopping a real computer or a virtual machine, such as a notebook computer or the like, is a function referred to as hibernation. When hibernation is executed, the computer stores data and the like of a main memory in a nonvolatile auxiliary storage device, and cuts off a power supply. This state is referred to as a hibernation state or a suspend state.
A virtual machine is a computer that is realized virtually by software or the like on a real computer. In particular, with regard to the virtual machine, a system virtual machine has a virtual CPU, a virtual main memory, a virtual auxiliary storage device, and the like. As application examples of the virtual machine, there are examples where a computer user is able to use a plurality of computers on one real computer.
Data of the virtual main memory of the virtual machine is stored in a file in the real computer. The file is called a physical memory file.
With regard to hibernation, there has been a problem in that, when a large amount of memory is allocated to the virtual machine, the amount of data to be stored in the auxiliary storage device of the real computer becomes large.
Thus, in order to solve this type of problem, there has been proposed a method of reducing the data in the main memory to be stored in the auxiliary storage device, for example, as disclosed in Non-Patent Document 1, Patent Document 1, and Patent Document 2.
A description is given concerning a computer system disclosed in Non-Patent Document 1, using FIG. 15. The computer system is configured from a virtual machine 2100, a memory file 2200, and a memory file compression unit 2300, included in a real computer 2001.
The virtual machine 2100 is configured from an operating system (referred to below as OS) 2101 and a memory usage part 2102.
The OS 2101 has functions for managing a virtual main memory of the virtual machine 2100, and by these functions, memory pages that can be destroyed are recovered from the virtual main memory, and memory pages are allocated to a program operating in the virtual machine 2100.
The memory usage part 2102 makes a request for allocation of memory pages with respect to the OS 2101 during operation of the virtual machine, and writes data suitable for compression to the allocated memory pages.
The memory file 2200 is a file in which the data of the virtual main memory of the virtual machine 2101 is written. The file is stored in an auxiliary storage device (not shown in the drawings) of the real computer 2001.
The memory file compression unit 2300 compresses the memory file 2200 after the virtual machine 2100 transitions to a hibernation state.
A conventional computer system having this type of configuration operates the memory usage part 2102 during operation of the virtual machine 2100. The memory usage part 2102 makes a request for memory pages to the OS 2101, performs an allocation, and writes data suitable for compression to the allocated memory pages. With regard to the memory usage part 2102, by executing the request and writing the data suitable for compression, the computer system increases memory pages in which data suitable for compression has been written, inside the virtual main memory. As a result, after the virtual machine 2100 has transitioned to the hibernation state, when the memory file 2200 is compressed in the memory file compression unit 2300, it is possible to compress the memory file 2200 at a higher compression ratio, so that the size of the memory file can be made smaller.
Patent Document 1 relates to a data save control method for a real computer, and, as shown in FIG. 16, is configured from a BIOS 3101, an OS 3102, and a high speed hibernation software driver 3103.
A computer system having this type of configuration operates as follows. Specifically, when a hibernation message is issued from the OS 3102, the high speed hibernation software driver 3103, in response to the hibernation message, requests memory management information (page information) showing present memory state, with respect to the OS 3102. The page information shows mapping information of a program (process) corresponding to a page actually present in the main memory (not shown in the drawings) of the real computer of Patent Document 1, and is managed by the OS 3102 in order to execute demand paging in order to realize a virtual memory mechanism.
The high speed hibernation software driver 3103, on receiving page information from the OS 3102, based on the present usage state of the main memory shown by the page information, checks physical memory addresses with regard to other pages outside of empty pages and discardable pages, and uses a file system of the OS 3102 to save the memory content thereof to a HDD (not shown in the drawings) of the real computer of Patent Document 1. When save processing is completed, the high speed hibernation software driver gives a power-off instruction to the BIOS 3101, and in response to this, power-off processing that turns OFF a power supply of the system is executed by the BIOS 3101 with respect to a power supply controller of the real computer of Patent Document 1.
Outside of this, Patent Document 2 discloses a hibernation device that evaluates system performance at a time of hibernation or wakeup, and according to the evaluation, determines whether or not to perform compression of memory content at the next and subsequent hibernation.
[Patent Document 1]
    Japanese Patent Kokai Publication No. JP-A-10-333997[Patent Document 2]    Japanese Patent Kokai Publication No. JP-P2001-22464A[Non-Patent Document 1]    Constantine P. Sapuntzakis, et al., “Optimizing the Migration of Virtual machines” ACM, 2002, pp. 377-390.